package com.zusmart.core.bean;

import com.zusmart.core.bean.cause.BeanInstanceCreateException;
import com.zusmart.core.bean.cause.BeanInstanceDestoryException;
import com.zusmart.core.bean.cause.BeanInstanceInitialException;
import com.zusmart.core.bean.cause.BeanInstanceInjectException;
import com.zusmart.core.bean.cause.BeanInstanceReleaseException;

/**
 * Bean定义生命周期
 * 
 * @author Administrator
 *
 */
public interface BeanDefinitionActivity {

	/**
	 * 创建操作,执行顺序:1
	 * 
	 * @throws BeanInstanceCreateException 创建异常
	 */
	public void doCreate() throws BeanInstanceCreateException;

	/**
	 * 注入操作,执行顺序:2
	 * 
	 * @throws BeanInstanceInjectException 注入异常
	 */
	public void doInject() throws BeanInstanceInjectException;

	/**
	 * 初始化操作,执行顺序:3
	 * 
	 * @throws BeanInstanceInitialException 初始化异常
	 */
	public void doInitial() throws BeanInstanceInitialException;

	/**
	 * 销毁操作,执行顺序:4
	 * 
	 * @throws BeanInstanceReleaseException 销毁异常
	 */
	public void doRelease() throws BeanInstanceReleaseException;

	/**
	 * 释放操作,执行顺序:5
	 * 
	 * @throws BeanInstanceDestoryException 释放异常
	 */
	public void doDestory() throws BeanInstanceDestoryException;

}